package com.example.gobang;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import cn.bmob.v3.Bmob;

public class MainActivity extends AppCompatActivity {
    private Button btnPeople;
    private Button btnInternet;
    private Button btnQuit;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        btnPeople=findViewById(R.id.btn_people);
        btnInternet=findViewById(R.id.btn_internet);
        btnQuit=findViewById(R.id.btn_quit);
        final Intent intent=new Intent(MainActivity.this,ShowActivity.class);

        btnPeople.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                intent.putExtra("TYPE",1);
                startActivity(intent);
            }
        });

        btnInternet.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                intent.putExtra("TYPE",2);
                startActivity(intent);
            }
        });

        btnQuit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
}
